<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>手写vue模板解析</title>
</head>
<body>
    <div id="app">
        <h1 v-if="show_h1">{{ str }} <span>啦啦啦</span></h1>
        {{str}}
        <p>{{a}}</p>
        <ul>
            <li v-for="text in list_arr">{{text}}</li>
        </ul>
    </div>
    <script type="text/javascript" src="newvue.js"></script>
    <script type="text/javascript">
        new Vue({
            el: '#app',
            data: {
                list_arr: ["item1", "item2", "item3"],
                show_h1: false,
                str: '小明',
                a:"louie"
            }
        }) 
    </script>
</body>
</html>